package com.tfb.rong;

import java.util.Date;

import com.tlr.device.model.Alert;
import com.tlr.device.model.HealthUser;

public class HealthAlert {

    private String id;
    private String devkey;
    private String code;
    private String time;
    private String type;
    private String position;
    private String lang;
    private String lati;
    private Date lastmodify;
    private Integer status;
    private String description;
    private Device device;
    private HealthUser health_user;

    public HealthAlert() {
    }

    public HealthAlert(Alert alert) {
        devkey = alert.getKey();
        code = alert.getCode();
        time = alert.getTime();
        type = alert.getType();
        position = alert.getPosition();
        lang = alert.getLang();
        lati = alert.getLati();
    }

    public Alert toAlert() {
        Alert alert = new Alert();
        alert.setKey(devkey);
        alert.setCode(code);
        alert.setTime(time);
        alert.setType(type);
        alert.setPosition(position);
        alert.setLang(lang);
        alert.setLati(lati);
        return alert;
    }

    public void setDevice(Device device) {
        this.device = device;
    }

    public Device getDevice() {
        return device;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getDevkey() {
        return devkey;
    }

    public void setDevkey(String devkey) {
        this.devkey = devkey == null ? null : devkey.trim();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time == null ? null : time.trim();
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position == null ? null : position.trim();
    }

    public String getLang() {
        return lang;
    }

    public void setLang(String lang) {
        this.lang = lang == null ? null : lang.trim();
    }

    public String getLati() {
        return lati;
    }

    public void setLati(String lati) {
        this.lati = lati == null ? null : lati.trim();
    }

    public Date getLastmodify() {
        return lastmodify;
    }

    public void setLastmodify(Date lastmodify) {
        this.lastmodify = lastmodify;
    }

    public void setHealth_user(HealthUser user) {
        this.health_user = user;
    }

    public HealthUser getHealth_user() {
        return health_user;
    }
}
